<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/head.jsp"%>
<div class="bjui-pageContent">
	<form action="${ctx}/sys/update${actionclass}.do" id="updateForm_${actionclass}" data-toggle="validate" data-alertmsg="false">
		<input type="hidden" value="${modifybean.id}" name="id" />
		<table class="table table-condensed table-hover" width="100%">
			<tbody>
				<tr>
					<td>
						<label for="Course_teacher" class="control-label x150">教师：</label>
						<select name="teacherId" id="Course_teacher" data-toggle="selectpicker" data-rule="required" data-width="300">
							<c:forEach items="${list }" var="item">
								<option value="${item.id }">${item.fname }</option>
							</c:forEach>
						</select>
					</td>
				</tr>

				<tr>
					<td>
						<label for="Course_name" class="control-label x150">课程：</label>
						<input type="text" name="name" value="${modifybean.name}" id="Course_name" data-rule="required" size="50">
					</td>
				</tr>

				<tr>
					<td>
						<label for="Course_keshi" class="control-label x150">课时：</label>
						<input type="text" name="keshi" value="${modifybean.keshi}" id="Course_keshi" data-rule="required;digits" size="15">
					</td>
				</tr>

				<tr>
					<td>
						<label for="Course_fen" class="control-label x150">学分：</label>
						<input type="text" name="fen" value="${modifybean.fen}" id="Course_fen" data-rule="required;number" size="15">
					</td>
				</tr>


			</tbody>
		</table>
	</form>
</div>
<div class="bjui-pageFooter">
	<ul>
		<li>
			<button type="button" class="btn-close" data-icon="close"> 关 闭 </button>
		</li>
		<li>
			<button type="submit" class="btn-default" data-icon="save"> 提 交 </button>
		</li>
	</ul>
</div>
<script type="text/javascript">
$("#Course_teacher").val("${modifybean.teacher.id}");

</script>
<script type="text/javascript">
	function pic_upload_success(file, data) {
		var json = $.parseJSON(data)
		$(this).bjuiajax('ajaxDone', json)
		if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
			$('#j_custom_pic').val(json.filename).trigger('validate')
			$('#j_custom_span_pic').html('<img src="${ctx}/resource/' + json.filename + '" width="100" />')
		//$('#j_custom_span_pic').html(json.filename)
		}
	}
</script>
